package cn.liuxiany.alibaba.storage.controller;

import cn.liuxiany.alibaba.storage.entity.StorageEntity;
import cn.liuxiany.alibaba.storage.service.IStorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author liuxiany
 * @since 2023-10-18
 */
@RestController
@RequestMapping("/storage/")
public class StorageController {

    @Autowired
    private IStorageService storageService;

    @PostMapping("test/add")
    public void testAdd(@RequestBody StorageEntity storage) {
        storageService.addStorage(storage);
    }
}
